package com.report.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.report.dto.request.CensusReq;
import com.report.dto.response.CensusRes;
import com.report.dto.response.FileRes;
import com.report.entity.PDFImage;
import com.report.entity.ResearchFile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author summer
 * @since 2024/06/25 14:54:47
 */
@Mapper
public interface FileMapper extends BaseMapper<ResearchFile> {

    /**
     * 查询列表
     * @param page
     * @param censusReq
     * @return
     */
    Page<CensusRes> censusRes(Page<CensusRes> page,@Param("censusReq") CensusReq censusReq);

    /**
     * 根据日期查询列表
     * @param page
     * @param censusReq
     * @return
     */
    Page<FileRes> itemLists(Page<FileRes> page, @Param("censusReq") CensusReq censusReq);

    /**
     * 删除文件
     * @param fileDate
     */
    void deleteItem(@Param("fileDate") Date fileDate);


    void updateOss(@Param("ids") List<Integer> ids);

    void savePdfImage(@Param("images") List<PDFImage> images);
}
